import Vue from 'vue'
import VueRouter from 'vue-router'
import Content from '../views/Content.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'index',
    redirect: '/recomend/rtstyle'
  },
  {
    path: '/recomend',
    name: 'Contentbox',
    component: () => import('../views/Contentbox.vue'),
    children: [
      { 
        path: '/recomend/rtstyle', 
        name: 'Gexing', 
        component: () => import('../views/recommend/Gexing.vue') 
      },
      { 
        path: '/recomend/songlist', 
        name: 'Songlist', 
        component: () => import('../views/recommend/Songlist.vue') 
      },
      { 
        path: '/recomend/anchorradio', 
        name: 'Anchorradio', 
        component: () => import('../views/recommend/Anchorradio.vue') 
      },
      { 
        path: '/recomend/ranklist', 
        name: 'Ranklist', 
        component: () => import('../views/recommend/Ranklist.vue') 
      },
      { 
        path: '/recomend/singer', 
        name: 'Singer', 
        component: () => import('../views/recommend/Singer.vue') 
      },
      { 
        path: '/recomend/latestmusic', 
        name: 'Latestmusic', 
        component: () => import('../views/recommend/Latestmusic.vue') 
      }
    ]
  }
]

const router = new VueRouter({
  routes
})

export default router
